<template>
    <div>
      <div class="top">
        <router-link to="/personal">
          <i class="el-icon-arrow-left top-content"></i>
        </router-link>
        <div class="top-content">
          我的订单
        </div>
      </div>
      <div class="menu">
        <div class="menu-main">
          <div class="menu-text" @click="didClickedItem('/personal/Order/all')" :class="{active: $route.path==='/personal/Order/all'}">
              全部订单
          </div>
          <div class="menu-text" @click="didClickedItem('/personal/Order/delivery')" :class="{active: $route.path==='/personal/Order/delivery'}">
              待收货
          </div>
          <div class="menu-text" @click="didClickedItem('/personal/Order/assess')" :class="{active: $route.path==='/personal/Order/assess'}">
              待评价
          </div>
          <div class="menu-text" @click="didClickedItem('/personal/Order/customService')" :class="{active: $route.path==='/personal/Order/customService'}">
              售后
          </div>
      </div>
     </div>
    </div>
</template>

<script>
export default {
  name: 'OrderTop',
  methods: {
    didClickedItem (tag) {
      this.$router.push(tag)
    }
  }
}
</script>

<style lang="scss" scoped>
@import "../../assets/styles/global";
  .top{
    height: 30px;
    line-height: 30px;
    background: skyblue;
    margin-bottom: 3px;
    .top-content{
      float: left;
      margin-left: 5px;
    }
    .el-icon-arrow-left{
      font-size: 18px;
      margin-top: 1px;

    }
  }
  .menu {
    width: 100%;
    .menu-main {
      height: 30px;
      line-height: 30px;
      background: #fff;
      position: relative;
      .menu-text {
        float: left;
        width: 25%;
        text-align: center;
        font-size: 10px;
      }
    }
  }
  .active{
    background: skyblue;
  }
</style>
